<!DOCTYPE html><html lang="zh-Hans"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"><meta name="description" content="iOS适配深色模式最佳方法，绝对干货"><meta name="keywords" content="ObjC,框架"><meta name="author" content="布多"><meta name="copyright" content="布多"><title>iOS适配深色模式最佳方法，绝对干货 | 布多的博客</title><link rel="shortcut icon" href="/melody-favicon.ico"><link rel="stylesheet" href="/css/index.css?version=1.9.1"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome@latest/css/font-awesome.min.css?version=1.9.1"><meta name="format-detection" content="telephone=no"><meta http-equiv="x-dns-prefetch-control" content="on"><link rel="dns-prefetch" href="https://cdn.jsdelivr.net"><link rel="dns-prefetch" href="https://hm.baidu.com"><script>var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?f0d94d3f99211c3546490e469f6ecbd8";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();</script><meta http-equiv="Cache-Control" content="no-transform"><meta http-equiv="Cache-Control" content="no-siteapp"><script src="https://v1.hitokoto.cn/?encode=js&amp;charset=utf-8&amp;select=.footer_custom_text" defer></script><script>var GLOBAL_CONFIG = { 
  root: '/',
  algolia: undefined,
  localSearch: {"path":"search.xml","languages":{"hits_empty":"找不到您查询的内容:${query}"}},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  hexoVersion: '6.3.0'
} </script><meta name="generator" content="Hexo 6.3.0"><link rel="alternate" href="/atom.xml" title="布多的博客" type="application/atom+xml">
</head><body><canvas class="fireworks"></canvas><i class="fa fa-arrow-right" id="toggle-sidebar" aria-hidden="true"></i><div id="sidebar" data-display="true"><div class="toggle-sidebar-info text-center"><span data-toggle="切换文章详情">切换站点概览</span><hr></div><div class="sidebar-toc"><div class="sidebar-toc__title">目录</div><div class="sidebar-toc__progress"><span class="progress-notice">你已经读了</span><span class="progress-num">0</span><span class="progress-percentage">%</span><div class="sidebar-toc__progress-bar"></div></div><div class="sidebar-toc__content"><ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#LLDark"><span class="toc-number">1.</span> <span class="toc-text">LLDark</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E7%89%B9%E6%80%A7"><span class="toc-number">2.</span> <span class="toc-text">特性</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#Demo"><span class="toc-number">3.</span> <span class="toc-text">Demo</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E7%94%A8%E6%B3%95"><span class="toc-number">4.</span> <span class="toc-text">用法</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%89%8D%E6%8F%90"><span class="toc-number">4.0.1.</span> <span class="toc-text">前提</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95"><span class="toc-number">4.0.2.</span> <span class="toc-text">基本用法</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E9%AB%98%E7%BA%A7%E7%94%A8%E6%B3%95"><span class="toc-number">4.0.3.</span> <span class="toc-text">高级用法</span></a></li></ol></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E5%BF%AB%E9%80%9F%E9%80%82%E9%85%8D"><span class="toc-number">5.</span> <span class="toc-text">快速适配</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E5%AE%89%E8%A3%85"><span class="toc-number">6.</span> <span class="toc-text">安装</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#CocoaPods"><span class="toc-number">6.0.1.</span> <span class="toc-text">CocoaPods</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E6%89%8B%E5%8A%A8%E5%AE%89%E8%A3%85"><span class="toc-number">6.0.2.</span> <span class="toc-text">手动安装</span></a></li></ol></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E7%B3%BB%E7%BB%9F%E8%A6%81%E6%B1%82"><span class="toc-number">7.</span> <span class="toc-text">系统要求</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E6%B3%A8%E6%84%8F%E7%82%B9"><span class="toc-number">8.</span> <span class="toc-text">注意点</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E5%B7%B2%E7%9F%A5%E9%97%AE%E9%A2%98"><span class="toc-number">9.</span> <span class="toc-text">已知问题</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E8%81%94%E7%B3%BB%E4%BD%9C%E8%80%85"><span class="toc-number">10.</span> <span class="toc-text">联系作者</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E8%AE%B8%E5%8F%AF%E8%AF%81"><span class="toc-number">11.</span> <span class="toc-text">许可证</span></a></li></ol></div></div><div class="author-info hide"><div class="author-info__avatar text-center"><img src="images/avatar.jpg"></div><div class="author-info__name text-center">布多</div><div class="author-info__description text-center">前进！前进！！不择手段地前进！！！</div><div class="follow-button"><a target="_blank" rel="noopener" href="https://github.com/internetwei">Follow Me</a></div><hr><div class="author-info-articles"><a class="author-info-articles__archives article-meta" href="/archives"><span class="pull-left">文章</span><span class="pull-right">9</span></a><a class="author-info-articles__tags article-meta" href="/tags"><span class="pull-left">标签</span><span class="pull-right">9</span></a><a class="author-info-articles__categories article-meta" href="/categories"><span class="pull-left">分类</span><span class="pull-right">4</span></a></div><hr><div class="author-info-links"><div class="author-info-links__title text-center">友链</div><a class="author-info-links__name text-center" target="_blank" rel="noopener" href="https://www.coderqi.com/">齐小胖之家</a></div></div></div><div id="content-outer"><div id="top-container" style="background-image: url(images/backgroundImage.jpg)"><div id="page-header"><span class="pull-left"> <a id="site-name" href="/">布多的博客</a></span><i class="fa fa-bars toggle-menu pull-right" aria-hidden="true"></i><span class="pull-right menus">   <a class="site-page" href="/">首页</a><a class="site-page" href="/tags">标签</a><a class="site-page" href="/categories">分类</a><a class="site-page" href="/archives">归档</a><a class="site-page" href="/about">关于</a></span><span class="pull-right"><a class="site-page social-icon search"><i class="fa fa-search"></i><span> 搜索</span></a></span></div><div id="post-info"><div id="post-title">iOS适配深色模式最佳方法，绝对干货</div><div id="post-meta"><time class="post-meta__date"><i class="fa fa-calendar" aria-hidden="true"></i> 2020-12-05</time><span class="post-meta__separator">|</span><i class="fa fa-inbox post-meta__icon" aria-hidden="true"></i><a class="post-meta__categories" href="/categories/iOS/">iOS</a><div class="post-meta-wordcount"><span>字数总计: </span><span class="word-count">1.9k</span><span class="post-meta__separator">|</span><span>阅读时长: 6 分钟</span></div></div></div></div><div class="layout" id="content-inner"><article id="post"><div class="article-container" id="post-content"><blockquote>
<p>由 布多(budo) 发布于 2020-12-05</p>
</blockquote>
<h1 id="LLDark"><a href="#LLDark" class="headerlink" title="LLDark"></a>LLDark</h1><p>适用于iOS的强大深色主题框架，快速适配深色模式。<br>国内用户可以访问<a target="_blank" rel="noopener" href="https://gitee.com/internetWei/llDark">这个链接</a></p>
<h1 id="特性"><a href="#特性" class="headerlink" title="特性"></a>特性</h1><ul>
<li>集成简单，只需改动少量代码即可完美适配。</li>
<li>高性能，仅在需要更新页面时更新指定页面，有相关缓存策略缩短刷新时长。</li>
<li>功能强大，所有使用UIColor、UIImage、CGColor的地方均可完美适配。</li>
<li>兼容iOS13以下机型。</li>
<li>支持从网络上获取深色主题配置。</li>
<li>自动适配启动图为APP当前主题模式。</li>
</ul>
<h1 id="Demo"><a href="#Demo" class="headerlink" title="Demo"></a>Demo</h1><p><img src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/eb36809a0d784094abb1f173d36e0f5e~tplv-k3u1fbpfcp-zoom-1.image" alt="Manual.gif"> <img src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/c62d05b8d9b14c1e9b5fc86d5c4e15fc~tplv-k3u1fbpfcp-zoom-1.image" alt="System.gif"> <img src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/ea92ed26bf5e466392e0edf9dc9abe0b~tplv-k3u1fbpfcp-zoom-1.image" alt="Screen.gif"></p>
<h1 id="用法"><a href="#用法" class="headerlink" title="用法"></a>用法</h1><h3 id="前提"><a href="#前提" class="headerlink" title="前提"></a>前提</h3><p>配置深色资源：<br>在工程任意NSObject分类(建议单独新建一个主题分类)中创建<code>+ (NSDictionary&lt;id, id&gt; *)llDarkTheme</code>类方法，字典的key表示浅色主题下的颜色&#x2F;图片名称&#x2F;图片地址，字典的value表示深色主题下的颜色&#x2F;图片名称&#x2F;图片地址。可参考样例代码：</p>
<figure class="highlight objc"><table><tr><td class="code"><pre><span class="line">+ (<span class="built_in">NSDictionary</span>&lt;<span class="type">id</span>, <span class="type">id</span>&gt; *)llDarkTheme &#123;</span><br><span class="line">    <span class="keyword">return</span> @&#123;</span><br><span class="line">             <span class="built_in">UIColor</span>.whiteColor : kColorRGB(<span class="number">27</span>, <span class="number">27</span>, <span class="number">27</span>),</span><br><span class="line">             kColorRGB(<span class="number">240</span>, <span class="number">238</span>, <span class="number">245</span>) : kColorRGB(<span class="number">39</span>, <span class="number">39</span>, <span class="number">39</span>),</span><br><span class="line">             [<span class="built_in">UIColor</span> colorWithRed:<span class="number">14.0</span> / <span class="number">255.0</span> green:<span class="number">255.0</span> / <span class="number">255.0</span> blue:<span class="number">0.0</span> alpha:<span class="number">1.0</span>] : [<span class="built_in">UIColor</span> colorWithRed:<span class="number">0.0</span> green:<span class="number">14.0</span> / <span class="number">255.0</span> blue:<span class="number">255.0</span> / <span class="number">255.0</span> alpha:<span class="number">1.0</span>],</span><br><span class="line">             <span class="string">@&quot;background_light&quot;</span> : <span class="string">@&quot;background_dark&quot;</span>,</span><br><span class="line">             <span class="string">@&quot;~/path/background_light.png&quot;</span> : <span class="string">@&quot;~/path/background_dark.png&quot;</span>,</span><br><span class="line">    &#125;;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>Tips:<br><code>1.不必把所有情况下的颜色/图片都填写进去，对于偶尔或少数使用到的深色颜色可以参考高级用法单独适配。 2.图片名称不用考虑倍图关系；如果填写的是图片路径一定要填写完整的图片路径(包含后缀)。</code></p>
<h3 id="基本用法"><a href="#基本用法" class="headerlink" title="基本用法"></a>基本用法</h3><p>UIColor和CGColor只需要追加.themeColor(nil)即可。<br>UIImage只需要将imageNamed或imageWithContentsOfFile替换为themeImage即可。</p>
<figure class="highlight objc"><table><tr><td class="code"><pre><span class="line"><span class="comment">// UIColor</span></span><br><span class="line"><span class="built_in">UIColor</span>.redColor; <span class="comment">// 之前的用法</span></span><br><span class="line"><span class="built_in">UIColor</span>.redColor.themeColor(<span class="literal">nil</span>); <span class="comment">// 现在的用法</span></span><br><span class="line"></span><br><span class="line"><span class="comment">// CGColor</span></span><br><span class="line"><span class="built_in">UIColor</span>.redColor.CGColor; <span class="comment">// 之前的用法</span></span><br><span class="line"><span class="built_in">UIColor</span>.redColor.themeCGColor(<span class="literal">nil</span>); <span class="comment">// 现在的用法</span></span><br><span class="line"></span><br><span class="line"><span class="comment">// UIImage</span></span><br><span class="line">[<span class="built_in">UIImage</span> imageNamed:<span class="string">@&quot;lightImageName&quot;</span>]; <span class="comment">// 之前的用法</span></span><br><span class="line">[<span class="built_in">UIImage</span> themeImage:<span class="string">@&quot;lightImageName&quot;</span>]; <span class="comment">// 现在的用法</span></span><br></pre></td></tr></table></figure>

<p>Tips:<br><code>1.themeImage适配了imageNamed和imageWithContentsOfFile两个方法，可以传递图片名称，也可以传递图片路径。 2.只有适配过的Color和Image在主题切换时才会刷新。 </code></p>
<h3 id="高级用法"><a href="#高级用法" class="headerlink" title="高级用法"></a>高级用法</h3><figure class="highlight objc"><table><tr><td class="code"><pre><span class="line"><span class="number">1.</span>themeColor()里面的参数如果是具体的Color对象，深色主题则会使用指定的Color对象刷新,</span><br><span class="line">如果是<span class="literal">nil</span>则会返回llDarkTheme中配置的深色颜色刷新，</span><br><span class="line">如果llDarkTheme未配置则会返回浅色主题下的颜色。</span><br><span class="line"></span><br><span class="line"><span class="number">2.</span>themeCGColor()参数的作用和themeColor()参数作用一样。</span><br><span class="line"></span><br><span class="line"><span class="number">3.</span>themeImage()有<span class="number">2</span>个参数，参数可以是图片名称，也可以是图片地址,</span><br><span class="line">第<span class="number">1</span>个参数表示浅色主题下使用的图片(必填)，</span><br><span class="line">第<span class="number">2</span>个参数表示深色主题下使用的图片(可以为空)，</span><br><span class="line">第<span class="number">2</span>个参数为空的话和themeColor()为空的处理方式一样。</span><br><span class="line"></span><br><span class="line"><span class="number">4.</span>appearanceBindUpdater，所有继承自<span class="built_in">UIView</span>的对象都拥有这个属性，</span><br><span class="line">对象需要刷新时会调用它，可以在这里实现自己的刷新逻辑。</span><br><span class="line">仅在需要刷新时会调用，主题更改不一定需要刷新UI。</span><br><span class="line"></span><br><span class="line"><span class="number">5.</span>userInterfaceStyle，类似iOS13系统的overrideUserInterfaceStyle方法，</span><br><span class="line">但是功能比overrideUserInterfaceStyle更加强大，</span><br><span class="line">它支持所有的对象，例如<span class="built_in">CALayer</span>。</span><br><span class="line">它支持iOS13以下的系统使用。</span><br><span class="line"></span><br><span class="line"><span class="number">6.</span>themeDidChange，所有对象都拥有这个属性，作用和ThemeDidChangeNotification一样，</span><br><span class="line">themeDidChange会在对象释放时被释放掉，</span><br><span class="line">可以在多个地方使用，不保证回调顺序，</span><br><span class="line">不同于appearanceBindUpdater，只要主题发生改变就会调用themeDidChange。</span><br><span class="line"></span><br><span class="line"><span class="number">7.</span>systemThemeDidChange，所有对象都拥有这个属性，作用和SystemThemeDidChangeNotification一样，</span><br><span class="line">释放时机和themeDidChange一样，</span><br><span class="line">可以在多个地方使用，不保证回调顺序，</span><br><span class="line">只要系统主题发生改变就会调用systemThemeDidChange。</span><br><span class="line"></span><br><span class="line"><span class="number">8.</span>darkStyle，所有<span class="built_in">UIImageView</span>对象都拥有这个方法，用于适配没有深色图片的图片对象，例如网络图片。</span><br><span class="line">darkStyle有<span class="number">3</span>个参数，第<span class="number">1</span>个参数决定如何适配深色主题，目前有LLDarkStyleSaturation和LLDarkStyleMask两种，</span><br><span class="line">LLDarkStyleMask使用蒙层适配，LLDarkStyleSaturation通过降低原图饱合度适配。</span><br><span class="line">第<span class="number">2</span>个参数决定蒙层透明度/饱合度值，具体使用可看源码注释。</span><br><span class="line">第<span class="number">3</span>个参数可以为<span class="literal">nil</span>，使用LLDarkStyleSaturation时需要传递一个唯一字符串当做标识符，通常是图片的url。</span><br><span class="line">样例代码：</span><br><span class="line"><span class="built_in">UIImageView</span> *imageView = [[<span class="built_in">UIImageView</span> alloc] init];</span><br><span class="line"><span class="built_in">NSString</span> *url = <span class="string">@&quot;图片URL&quot;</span>;</span><br><span class="line">imageView.darkStyle(LLDarkStyleSaturation, <span class="number">0.2</span>, url);</span><br><span class="line"><span class="comment">// imageView.darkStyle(LLDarkStyleMask, 0.5, nil);</span></span><br><span class="line"></span><br><span class="line"><span class="number">9.</span>updateDarkTheme:，如果需要运行时修改深色主题配置信息，或者需要从网络上获取深色主题配置信息，可以使用updateDarkTheme:来达到目的。</span><br><span class="line">请确保在第<span class="number">1</span>个UI对象加载前配置好深色主题信息，否则会无效。</span><br><span class="line">样例代码:</span><br><span class="line"><span class="built_in">NSDictionary</span> *darkTheme = @&#123;</span><br><span class="line">    <span class="built_in">UIColor</span>.whiteColor : kColorRGB(<span class="number">27</span>, <span class="number">27</span>, <span class="number">27</span>),</span><br><span class="line">    kColorRGB(<span class="number">240</span>, <span class="number">238</span>, <span class="number">245</span>) : kColorRGB(<span class="number">39</span>, <span class="number">39</span>, <span class="number">39</span>),</span><br><span class="line">    [<span class="built_in">UIColor</span> colorWithRed:<span class="number">14.0</span> / <span class="number">255.0</span> green:<span class="number">255.0</span> / <span class="number">255.0</span> blue:<span class="number">0.0</span> alpha:<span class="number">1.0</span>] : [<span class="built_in">UIColor</span> colorWithRed:<span class="number">0.0</span> green:<span class="number">14.0</span> / <span class="number">255.0</span> blue:<span class="number">255.0</span> /  <span class="number">255.0</span> alpha:<span class="number">1.0</span>],</span><br><span class="line">    <span class="string">@&quot;background_light&quot;</span> : <span class="string">@&quot;background_dark&quot;</span>,</span><br><span class="line">    <span class="string">@&quot;~/path/background_light.png&quot;</span> : <span class="string">@&quot;~/path/background_dark.png&quot;</span>,</span><br><span class="line">&#125;;</span><br><span class="line">[LLDarkSource updateDarkTheme:darkTheme];</span><br><span class="line"></span><br><span class="line"><span class="number">10.</span>thirdControlClassName，如果需要支持第<span class="number">3</span>方控件的刷新方法，可以在appearanceBindUpdater中单独实现刷新逻辑，也可以按照如下方法实现刷新逻辑，更加推荐如下方法。</span><br><span class="line">首先需要实现thirdControlClassName这个类方法，并返回一个数组，数组包含第<span class="number">3</span>方控件的类名字符串。</span><br><span class="line">然后实现refresh+类名字符串的对象方法，在方法里实现第<span class="number">3</span>方控件的刷新逻辑，可以参考LLThird.m文件中已经实现的YYLabel的刷新逻辑。</span><br><span class="line">详情可以下载工程查看Demo了解具体实现。</span><br></pre></td></tr></table></figure>
<p>高级用法中第8条darkStyle方法的样例图(为了突出效果特意将饱合度和透明度调整的很低)：<br><img src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/1241324201ce4deea2ab431d547b9a62~tplv-k3u1fbpfcp-zoom-1.image" alt="137a9000178656346577e"> </p>
<h1 id="快速适配"><a href="#快速适配" class="headerlink" title="快速适配"></a>快速适配</h1><p>仅需要3步即可快速完美适配深色主题模式，经测试大部分工程都能在0.5天内适配完成，<br>少量工程1天内适配完成，极少需要1天以上的工作量进行适配。</p>
<ol>
<li>配置深色主题资源，可参考<code>前提</code>，也可以参考<code>高级方法9</code>从网络中获取资源适配。</li>
<li>将需要适配的Color和Image适配为主题Color和主题Image，适配方法可参考<code>基础用法</code>和<code>高级用法</code>。</li>
<li>运行工程，检查完整性。</li>
</ol>
<p>Tips:<br>如果您还需要适配<code>WKWebView</code>，可以<a target="_blank" rel="noopener" href="https://www.jianshu.com/p/be578117f84c">点击链接</a>参考文章进行适配。</p>
<h1 id="安装"><a href="#安装" class="headerlink" title="安装"></a>安装</h1><h3 id="CocoaPods"><a href="#CocoaPods" class="headerlink" title="CocoaPods"></a>CocoaPods</h3><ol>
<li>将 cocoapods 更新至最新版本。</li>
<li>在 Podfile 中添加 pod ‘LLDark’。</li>
<li>执行 pod install 或 pod update。</li>
<li>导入 &lt;LLDark&#x2F;LLDark.h&gt;。</li>
</ol>
<h3 id="手动安装"><a href="#手动安装" class="headerlink" title="手动安装"></a>手动安装</h3><ol>
<li>下载 LLDark 文件夹内的所有内容。</li>
<li>将 LLDark 工程中的LLDark文件夹添加(拖放)到你的工程。</li>
<li>导入 “LLDark.h”。</li>
</ol>
<h1 id="系统要求"><a href="#系统要求" class="headerlink" title="系统要求"></a>系统要求</h1><p>该项目最低支持iOS9.0和Xcode10.0，如果想在更低系统上使用请联系作者。</p>
<h1 id="注意点"><a href="#注意点" class="headerlink" title="注意点"></a>注意点</h1><ol>
<li>需要自己监听主题模式修改状态栏颜色。</li>
</ol>
<h1 id="已知问题"><a href="#已知问题" class="headerlink" title="已知问题"></a>已知问题</h1><ul>
<li>需要适配深色主题的图片资源请不要放在Assets.xcassets中，否则可能会获取不到。</li>
<li>暂时不支持其他主题模式，后续会支持多种主题自由搭配。</li>
</ul>
<h1 id="联系作者"><a href="#联系作者" class="headerlink" title="联系作者"></a>联系作者</h1><p>如果你有更好的改进，please pull reqeust me</p>
<p>如果你有任何更好的意见，请创建一个<a target="_blank" rel="noopener" href="https://github.com/internetWei/llDark/issues">Issue</a></p>
<p>可以通过此邮箱联系作者<code>internetwei@foxmail.com</code></p>
<h1 id="许可证"><a href="#许可证" class="headerlink" title="许可证"></a>许可证</h1><p>LLDark 使用 MIT 许可证，详情见 LICENSE 文件。</p>
</div></article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta">文章作者: </span><span class="post-copyright-info"><a href="mailto:undefined">布多</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta">文章链接: </span><span class="post-copyright-info"><a href="https://internetwei.github.io/2020/12/05/iOS/iOS适配深色模式最佳方法，绝对干货/iOS适配深色模式最佳方法，绝对干货/">https://internetwei.github.io/2020/12/05/iOS/iOS适配深色模式最佳方法，绝对干货/iOS适配深色模式最佳方法，绝对干货/</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta">版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外，均采用 <a target="_blank" rel="noopener" href="https://creativecommons.org/licenses/by-nc-sa/4.0/">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="https://internetwei.github.io">布多的博客</a>！</span></div></div><div class="post-meta__tag-list"><a class="post-meta__tags" href="/tags/ObjC/">ObjC</a><a class="post-meta__tags" href="/tags/%E6%A1%86%E6%9E%B6/">框架</a></div><nav id="pagination"><div class="prev-post pull-left"><a href="/2021/03/07/iOS/LLDynamicLaunchScreen%E7%9A%84%E8%AE%BE%E8%AE%A1%E6%80%9D%E8%B7%AF/LLDynamicLaunchScreen%E7%9A%84%E8%AE%BE%E8%AE%A1%E6%80%9D%E8%B7%AF/"><i class="fa fa-chevron-left">  </i><span>LLDynamicLaunchScreen的设计思路</span></a></div></nav><div id="lv-container" data-id="city" data-uid="MTAyMC81MzU5Ny8zMDA3MA=="><script>(function(d, s) {
    var j, e = d.getElementsByTagName(s)[0];
    if (typeof LivereTower === 'function') { return; }
    j = d.createElement(s);
    j.src = 'https://cdn-city.livere.com/js/embed.dist.js';
    j.async = true;
    e.parentNode.insertBefore(j, e);
})(document, 'script');</script></div></div></div><footer class="footer-bg" style="background-image: url(images/backgroundImage.jpg)"><div class="layout" id="footer"><div class="copyright">&copy;2021 - 2025 By 布多</div><div class="framework-info"><span>驱动 - </span><a target="_blank" rel="noopener" href="http://hexo.io"><span>Hexo</span></a><span class="footer-separator">|</span><span>主题 - </span><a target="_blank" rel="noopener" href="https://github.com/Molunerfinn/hexo-theme-melody"><span>Melody</span></a></div><div class="footer_custom_text">hitokoto</div><div class="busuanzi"><script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script><span id="busuanzi_container_page_pv"><i class="fa fa-file-o"></i><span id="busuanzi_value_page_pv"></span><span></span></span></div></div></footer><i class="fa fa-arrow-up" id="go-up" aria-hidden="true"></i><script src="https://cdn.jsdelivr.net/npm/animejs@latest/lib/anime.min.js"></script><script src="https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.js"></script><script src="https://cdn.jsdelivr.net/npm/velocity-animate@latest/velocity.min.js"></script><script src="https://cdn.jsdelivr.net/npm/velocity-ui-pack@latest/velocity.ui.min.js"></script><script src="/js/utils.js?version=1.9.1"></script><script src="/js/fancybox.js?version=1.9.1"></script><script src="/js/sidebar.js?version=1.9.1"></script><script src="/js/copy.js?version=1.9.1"></script><script src="/js/fireworks.js?version=1.9.1"></script><script src="/js/transition.js?version=1.9.1"></script><script src="/js/scroll.js?version=1.9.1"></script><script src="/js/head.js?version=1.9.1"></script><script src="/js/search/local-search.js"></script><script>if(/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(navigator.userAgent)) {
  $('#nav').addClass('is-mobile')
  $('footer').addClass('is-mobile')
  $('#top-container').addClass('is-mobile')
}</script><div class="search-dialog" id="local-search"><div class="search-dialog__title" id="local-search-title">本地搜索</div><div id="local-input-panel"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章"></div></div></div><hr><div id="local-search-results"><div id="local-hits"></div><div id="local-stats"><div class="local-search-stats__hr" id="hr"><span>由</span> <a target="_blank" rel="noopener" href="https://github.com/wzpan/hexo-generator-search" style="color:#49B1F5;">hexo-generator-search</a>
 <span>提供支持</span></div></div></div><span class="search-close-button"><i class="fa fa-times"></i></span></div><div class="search-mask"></div></body></html>